class Solution {
public:
    long long dp[105][2];
    bool flag[105][2];
    long long dfs(int n, int f)
    {
        if (flag[n][f]) return dp[n][f];
        if (!n) return 0;
        long long ans = -1;
        for (int i = 1; i < n; i++)
        {
            ans = max(ans, i * dfs(n - i, 1));
        }
        if (f) ans = max(ans, (long long)n);
        flag[n][f] = 1;
        return dp[n][f] = ans;
    }
    int integerBreak(int n) {
        return dfs(n, 0);
    }
};